package com.annotationAndReflection;


import java.lang.annotation.ElementType;

//哪些类型拥有Class对象
public class Test01 {
    public static void main(String[] args) {
        //Idea alt 复制一整列
        Class c1 = Object.class;//类
        Class c2 = Comparable.class;//接口
        Class c3 = String[].class;//数组
        Class c4 = int[][].class;//二维数组
        Class c5 = Override.class;//注解
        Class c6 = ElementType.class;//枚举
        Class c7 = Integer.class;//基本类型
        Class c8 = void.class;//void
        Class c9 = Class.class;//Class

        System.out.println(c1);
        System.out.println(c2);
        System.out.println(c3);
        System.out.println(c4);
        System.out.println(c5);
        System.out.println(c6);
        System.out.println(c7);
        System.out.println(c8);
        System.out.println(c9);
        //只要元素类型和维度一样,就是同一个Class
        int[] a = new int[10];
        int[] b = new int[100];
        System.out.println(a.getClass().equals(b.getClass()));//true
    }
    /*
    * class java.lang.Object
      interface java.lang.Comparable
      class [Ljava.lang.String;
      class [[I
      interface java.lang.Override
      class java.lang.annotation.ElementType
      class java.lang.Integer
      void
      class java.lang.Class
    * */
}

    